@use "../../common";

.card_container {
  width: 100%;
  max-width: 240px;
  padding: 1rem;

  .card {
    @include common.roundCorners;
    position: relative;
    display: flex;
    flex-flow: column;

    box-shadow: 0 0.25rem 0.5rem 0 rgba(0, 0, 0, 0.2);
    background-color: common.$background2;
    transition: common.$short-duration ease-in-out;
    cursor: pointer;

    &.animated:hover {
      box-shadow: 0 0.5rem 1rem 0 rgba(0, 0, 0, 0.2);
      transform: scale(1.1);
      
      .overlay {
        opacity: 1;
      }
    }

    .overlay {
      position: absolute;
      top: 0;
      bottom: 0;
      left: 0;
      right: 0;
      height: 100%;
      width: 100%;
      opacity: 0;
      transition: .5s ease;
      background-color: rgba(0, 0, 0, 0.4);
    }

    .thumbnail {
      @include common.roundCorners;
      position: relative;
      height: 0;
      padding-top: 100%;
      background-size: cover !important;
      background-position: center !important;
    }

    .card_content {
      padding: 1em;
      height: auto;

      h4 {
        @include common.ellipsis;
      }

      p {
        @include common.ellipsis;
        color: rgba(common.$white, 0.6);
      }
    }
    .menu_button {
      position: absolute;
      z-index: 10;
      margin: 1em;
      align-self: flex-end;
    }
  }
}
